package com.zy.ServletFilter;

import javax.servlet.*;
import java.io.IOException;

//web.xml方式配置
public class FilterDemo2 implements Filter
{

    @Override
    public void init(FilterConfig filterConfig) throws ServletException
    {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
    {
        System.out.println("Filter2过滤器被执行----");

        //放行
        filterChain.doFilter(servletRequest,servletResponse);
    }
    @Override
    public void destroy()
    {

    }
}
